home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / asmlib35.zip / MODE.DOC < prev    next >
Text File  |  1993-01-22  |  15KB  |  381 lines

  1.  
  2. ****************************  VIDEO MODES  ***********************************
  3.  
  4. ASMLIB video mode subroutines (c) Copyright 1991 Douglas Herr
  5. All rights reserved
  6.  
  7. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  8.  
  9. HGRAPH:      establishes Hercules graphics mode, pages 0 & 1
  10. HGRAPH0:     establishes Hercules graphics mode, clear page 0 only
  11. Source:      hgraph.asm (a$herc.asm, hmode.asm)
  12.  
  13. Hercules or compatible required
  14. (including Hercules InColor)
  15.  
  16. Call with:   no parameters
  17. Returns:     if CF = 1, no Hercules installed
  18.              if CF = 0, AX = code for Hercules model
  19.              128 = HGC
  20.              144 = HGC+
  21.              208 = InC
  22. Uses:        AX, CX, CF
  23. Supports:    Hercules graphics cards and compatibles: graphics mode
  24.              see also Use64k in SYSTEM.DOC
  25. Example:     call    hgraph      ; establish graphics mode
  26.              jc      no_hercules ; drat!
  27.  
  28.  
  29. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  30.  
  31. HRAM8043:    establish an 80-column, 43-row RamFont mode, loading a
  32.              standard 8x8 character font in RAM
  33. Source:      hram8043.asm (a$herc.asm, hmode.asm, hload8x8.asm)
  34.  
  35. HRAM9025:    establish a 90-column, 25-row RamFont mode using
  36.              standard ROM characters
  37. Source:      hram9025.asm (a$herc.asm, hmode.asm)
  38.  
  39. HRAM9043:    establish a 90-column, 43-row RamFont mode, loading a
  40.              standard 8x8 character font in RAM
  41. Source:      hram9043.asm (a$herc.asm, hload8x8.asm, hmode.asm)
  42.  
  43. Hercules RamFont card required
  44. (including Hercules InColor)
  45.  
  46. Note:        use htext to restore normal 80 x 25 text mode
  47.  
  48. Call with:   no parameters
  49. Returns:     if CF = 1, no RamFont card installed
  50.              if CF = 0, AX = code for Hercules model
  51.              144 = HGC+
  52.              208 = InC
  53. Uses:        AX, CF; all other flags and registers are saved
  54. Supports:    HGC+ and InC cards: 4k RamFont mode
  55. Example:     call  hram8043      ; RamFont mode: 80x43
  56.              jc    no_ramfont    ; drat!
  57.  
  58.  
  59. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  60.  
  61. HTEXT:       establish (or restore) Hercules text mode
  62. Source:      htext.asm (a$herc, hmode)
  63.  
  64. Call with:   no parameters
  65. Returns:     if CF = 1, no Hercules installed
  66.              if CF = 0, AX = code for Hercules model
  67.              128 = HGC
  68.              144 = HGC+
  69.              208 = InC
  70. Uses:        AX, CF
  71. Supports:    Hercules graphics cards and compatibles: text mode
  72.              (including Hercules InColor)
  73. Example:     call  htext         ; Hercules text mode
  74.              jc    no_herc       ; drat!
  75.  
  76.  
  77. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  78.  
  79. MODE13243:   switches supported systems to 132 column, 43 row text mode
  80. MODE13225:   switches supported systems to 132 column, 25 row text mode
  81. Source:      mode132.asm (isevga.asm)
  82.  
  83. Call with:   AX = SuperEGA/VGA code returned by IsSEVGA
  84. Returns:     CF = 1 if mode not supported
  85.              if CF = 0, AX = mode number
  86. Uses:        AX, CF; all other registers and flags are saved
  87. Supports:    Equipment detected by IsSEVGA (see IsSEVGA in SYSTEM.DOC).
  88.              Most VGA boards require a multi-frequency monitor to
  89.              use 132-column modes; consult your board's documentation.
  90.              The Paradise EGA 480 requires an EGA monitor; the Everex
  91.              EGA works with Monochrome and EGA monitors, and the 25-row
  92.              mode also works with a CGA monitor.
  93. Example:
  94.  
  95.     call  issevga        ; test for Super EGA or Super VGA
  96.     jc    no132          ; no good - skip
  97.     call  mode13243      ; set mode
  98.     jc    no132          ; no good
  99.           .
  100.           .
  101.           .
  102.  
  103.  
  104.  
  105. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  106.  
  107. MODECOLOR:   switches system to color text mode; may be used to switch
  108.              monitors on a 2-monitor system, or to switch to the standard
  109.              80-column, 25-rows color mode from other color modes
  110. Source:      mode.asm (find6845.asm)
  111.  
  112. Call with:   no parameters
  113. Returns:     CF = 1 if no color monitor
  114.              CF = 0 if successful
  115. Uses:        CF; all registers and all other flags are saved
  116. Example:     call  modecolor
  117.              jc    nocolor
  118.                 .
  119.                 .
  120.                 .
  121.  
  122. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  123.  
  124. MODEMONO:    switches system to monochrome text mode; may be used either
  125.              to switch active monitors on a 2-monitor sysem or to switch
  126.              to monchrome text mode (80x25) from graphics mode (EGA or
  127.              Hercules).
  128. Source:      mode.asm (find6845.asm)
  129.  
  130. Call with:   no parameters
  131. Returns:     CF = 1 if no monochrome monitor
  132.              CF = 0 if successful
  133. Uses:        CF; all registers and all other flags are saved
  134. Example:     call  modemono
  135.              jc   nomono
  136.                 .
  137.                 .
  138.                 .
  139.  
  140. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  141.  
  142. MODE43:      switch EGA to 80x43 text mode or VGA to 80x50 text mode
  143.              Mode43 switches an EGA to the 80-column, 43-row text mode from
  144.              any color mode or any EGA monochrome mode, or switches a color
  145.              VGA to 80x50 text mode from any other color mode.
  146. Source:      mode43.asm
  147.  
  148. Call with:   no parameters
  149. Returns:     if CF = 1, AX = 0 if no EGA or VGA in system
  150.                         AX = -1 if EGA connected to CGA monitor
  151.              if CF = 0, AX = 3 if EGA or VGA connected to color monitor
  152.                         AX = 7 if EGA or VGA connected to monochrome monitor
  153. Uses:        AX, CF; all other registers and flags are saved
  154. Example:     call  mode43
  155.              jc    noega
  156.  
  157.  
  158.  
  159. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  160.  
  161. SUPER13:     changes standard VGA systems to an undocumented 320x400
  162.              256-color graphics mode.  ASMLIB supports 2 graphics pages
  163.              in this mode.  See also XModeClear.
  164. Source:      super13.asm ($graph.asm)
  165.  
  166. Call with:   no parameters
  167. Returns:     if CF = 1, no VGA installed
  168.              if CF = 0, all OK
  169. Uses:        AX, CF
  170. Supports:    VGA only: graphics mode
  171. Example:     call   super13
  172.              jc     oops             ; do something else if no VGA
  173.  
  174.  
  175. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  176.  
  177. SUPER13A:    an undocumented 360x480 256-color mode for any VGA system.
  178.              One page is available in this mode.  See Super13 for example.  
  179.              ASMLIB graphics subroutines recognize this mode.
  180.              Super13a is based on John Bridges' code and parameters.
  181. Source:      super13a.asm ($graph.asm)
  182.  
  183. Call with:   no parameters
  184. Returns:     if CF = 1, no VGA installed
  185.              if CF = 0, all OK
  186. Uses:        AX, flags
  187. Supports:    VGA only: graphics mode
  188. Example:     call   super13a
  189.              jc     oops             ; do something else if no VGA
  190.  
  191.  
  192.  
  193.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  194.  
  195. SVGA16:      set Super VGA mode
  196. Source:      svga16.asm (banks.asm)
  197.  
  198. Call with:   AX = 16-color mode desired
  199.              AX = 0 for 800x600
  200.              AX = 1 for 1024x768
  201.  
  202.              !! DO NOT USE ANY VALUE FOR AX OTHER THAN 0 OR 1 !!
  203.  
  204.              ASMLIB's SVGA subroutines are derived from John Bridges'
  205.              public domain VGAKIT board identification and bank switching code.
  206.              Boards supported are:
  207.  
  208.              Ahead Technologies
  209.              ATI
  210.              Chips & Technologies
  211.              Everex
  212.              Genoa GVGA
  213.              NCR
  214.              Oak Technologies
  215.              Paradise (Western Digital)
  216.              Trident
  217.              Trident 8900
  218.              Tseng (Genoa, Orchid, Willow)
  219.              Tseng 4000
  220.              VESA standard  (800x600 only)
  221.              Video 7
  222.  
  223.              I have not been able to test VGAKIT modes on all boards; please
  224.              let me know if you encounter difficulties.
  225.  
  226. Returns:     AX = mode number
  227.              if AX = 0, requested mode is not available
  228.              SVGA16 cannot determine if the monitor you are using will
  229.              work with the requested mode.  Monitor damage may result
  230.              from improper use of SVGA16.
  231.  
  232. Example:
  233.  
  234. include asm.inc
  235.  
  236. public mygraph
  237. extrn  whichvga:proc, extrn  svga16:proc
  238.  
  239. .code
  240. mygraph proc
  241. ; I want to use a 16-color 1024x768 mode if available
  242. ; start by calling WhichVGA to determine if the equipment is capable
  243.         call   whichvga
  244.         or     ax,ax            ; SuperVGA installed?
  245.         jz     no_svga          ; nope, use some other mode
  246.         mov    ax,1             ; specify 1024x768 mode
  247.         call   svga16
  248.  
  249.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  250.  
  251. SVGA256:     set Super VGA 256-color mode
  252. Source:      svga256.asm (banks.asm)
  253.  
  254. Call with:   AX = 256-color mode desired
  255.              AX = 0 for  640x400
  256.              AX = 1 for  640x480
  257.              AX = 2 for  800x600
  258.              AX = 3 for 1024x768
  259.  
  260.              !! DO NOT USE ANY AX VALUES OTHER THAN 0, 1, 2 & 3 !!
  261.  
  262.              ASMLIB's SVGA subroutines are derived from John Bridges'
  263.              public domain VGAKIT board identification and bank switching code.
  264.  
  265.              Equipment supported is listed under SVGA16, plus:
  266.  
  267.              Compaq (640x480 only)
  268.  
  269.  
  270. Returns:     AX = mode number
  271.              if AX = 0, requested mode is not available
  272.              SVGA256 cannot determine if the monitor you are using will
  273.              work with the requested mode.  Monitor damage may result
  274.              from improper use of SVGA256.
  275.  
  276. Example:     see SVGA16
  277.  
  278. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  279.  
  280. XMODE16:     establish SuperEGA/SuperVGA graphics mode and configure
  281.              ASMLIB graphics subroutines to work with the mode.
  282. XMODECLEAR:  restore ASMLIB's default graphics configuration
  283. Source:      xmode16.asm ($graph.asm)
  284.  
  285. Parameters:  maximum x, maximum y, registers as required to set mode.
  286.              XMode16 assumes that the mode is set with AH = 0.
  287. Returns:     nothing
  288. Uses:        All registers and flags saved.
  289. Supports:    16-color EGA/VGA-style graphics modes, up to 800 x 600 pixels.
  290.              Various equipment.  You must have the required equipment and
  291.              use the correct mode number;  hardware damage may result from
  292.              improper use of XMode16.  I cannot be held responsible for
  293.              damage resulting from use or misuse of XMode16.  Use XMode16
  294.              if your equipment is not supported by SVGA16.
  295.  
  296.              If 800 horizontal pixels are available, maxX% should be 799.
  297.              Similarly, if 600 vertical pixels are possible, maxY% should
  298.              be 599.
  299.  
  300.              Your graphics card manual lists mode numbers, monitor
  301.              requirements, and the number of horizontal and vertical
  302.              pixels corresponding to the mode.  Mode numbers are usually
  303.              in hex format.  Some modes and corresponding mode numbers
  304.              are listed on the next pages.
  305.  
  306.  
  307.  
  308.     Equipment            mode     mode number   Example
  309.  
  310.     Orchid ProDesigner   800x600        29h     mov   ax,799
  311.     STB EM/16                                   push  ax
  312.     Genoa                                       mov   ax,599
  313.     Sigma X16                                   push  ax
  314.     (Tseng chip set)                            mov   al,29h
  315.                                                 call  xmode16
  316.  
  317.  
  318.     Everex MED EGA       640X480   AL = 70h, BL = 00h
  319.     (Micro Enhancer Deluxe)
  320.                          752x410   AL = 70h, BL = 01h
  321.                                                 mov   ax,751
  322.                                                 push  ax
  323.                                                 mov   ax,409
  324.                                                 push  ax
  325.                                                 mov   al,70h
  326.                                                 mov   bl,01h
  327.                                                 call  xmode16
  328.  
  329.  
  330.     ATI VGA Wonder       800x600        54h     mov   ax,799
  331.                                                 push  ax
  332.                                                 mov   ax,599
  333.                                                 push  ax
  334.                                                 mov   al,54h
  335.                                                 call  xmode16
  336.  
  337.  
  338.     ATI VIP              800x560        53h     mov   ax,799
  339.                                                 push  ax
  340.                                                 mov   ax,559
  341.                                                 push  ax
  342.                                                 mov   al,53h
  343.                                                 call  xmode16
  344.  
  345. (continued)
  346.  
  347.     Paradise Plus-16     800x600        58h     mov   ax,799
  348.     Paradise Professional                       push  ax
  349.                                                 mov   ax,599
  350.                                                 push  ax
  351.                                                 mov   al,58h
  352.                                                 call  xmode16
  353.     
  354.  
  355.     Video 7 Fastwrite    800x600        62h     mov   ax,799
  356.     Video 7 VRAM                                push  ax
  357.                                                 mov   ax,599
  358.                                                 push  ax
  359.                                                 mov   al,62h
  360.                                                 call  xmode16
  361.  
  362.  
  363.     Western Digital      800x600   6Ah (color)  mov   ax,799
  364.                                    6Bh (mono)   push  ax
  365.     (VESA modes)                                mov   ax,599
  366.                                                 push  ax
  367.                                                 mov   al,6Ah   ; color
  368.                                                 call  xmode16
  369.     
  370.  
  371.     If any of this information conflicts with the specifications in your
  372.     video card's instruction manual, the manual's recommendation is a safer
  373.     bet.  Note that all the above modes require a multi-frequency monitor.
  374.  
  375.     When you're all done with Graphics mode, CALL ModeColor to return to
  376.     80x25 text mode, and CALL XModeClear to reset ASMLIB's graphics mode
  377.     flags.
  378.  
  379.  
  380.  
  381.